<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">@charset "UTF-8";[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>接口调用说明</title>

    <link href="static/bootstrap.min.css" rel="stylesheet">
    <link href="static/webservice.css" rel="stylesheet">

    <script src="static/jquery-3.2.1.min.js"></script>
    <script src="static/bootstrap.min.js"></script>
    <script src="static/jquery.goup.min.js"></script>

    <link href="static/default.css" rel="stylesheet">
    <script src="static/highlight.pack.js"></script>
</head>

<body style="height:1000PX">    
    <div style="height:100%">
        <!--DIV-1   顶部导航栏-->
        <div class="nav navbar-inverse navbar-fixed-top nav-bg">
            <div class="container">
                <!--avbar-header-->
                <div class="navbar-header">
                    <!--手机端按钮。toggle：切换,collapse：折叠-->
                    <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#phoneButton">
                        <span class="sr-only">Toggle Navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href="javascript:void(0);" target="_blank"><img src="#(root)img/logo.png" class="img-responsive" style="height: 55px; padding-top: 0; "></a>
                </div>
                <div class="collapse navbar-collapse" id="phoneButton" style="margin-left: -20px;">
                    <ul class="nav navbar-nav">
                        <li>
                            <a style="font-size: 18px;">中汽数据服务接口平台</a>
                        </li>
                        <!--dropdown：下拉菜单-->
                        <li >
                            <a >
                                <span class="glyphicon glyphicon-duplicate"></span> 开发文档
                                <!--<span class="caret"></span>-->
                            </a>
                            <!--divider：分割线-->
                            <!--<ul class="dropdown-menu">
                                <li>
                                    <a>开发文档链接1</a>
                                </li>
                                <li role="separator" class="divider"></li>
                                <li class="disabled">
                                    <a>开发文档链接2</a>
                                </li>
                            </ul>-->
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>

        <div class="content ng-scope" style="height:700PX" id="body_content" ng-app="myApp" ng-controller="myCtrl">

            <!--手机端顶部的button-->
            <div style="margin-top: 60px;" class="visible-xs-block" id="phone-left">
                <button class="btn btn-danger" type="button">Menu</button>
            </div>
            <!--手机端顶部的button-->

            <!--左侧目录树  content-left-->
            <div class="col-md-2 col-sm-3 col-xs-0 col-lg-2  hidden-xs" id="content-left" title="">
                <!--左侧目录数据绑定-->
                <!--<div class="left" ng-repeat="i in interfaces" ng-click="onLeftClick($index)" ng-cloak>
                    <a href="javascript:void(0);" class="{{$index == showContentIndex?'active':''}}" title="{{i.method}}">
                        {{$index+1}}.{{i.name}} <br /> {{i.method}}
                    </a>
                </div>-->
                <!-- ngRepeat: item in interfaceGroup --><div class="left ng-scope" ng-repeat="item in interfaceGroup">
                    <div ng-bind="tableMark=$index" style="display:none" class="ng-binding">0</div>
                    <div class="ng-binding">VIN</div>
                    <div class="method-title ng-scope" ng-repeat="value in interfaceGroup[$index].data track by $index" ng-click="onLeftClick(value.method)">
                        <a href="javascript:void(0);" class="active"  title="level.vehicle.vin.get">
                            1.VIN码车型在线查询
                        </a>
                    </div>
                    <div class="ng-binding">投保</div>
                    <div class="method-title ng-scope" ng-repeat="value in interfaceGroup[$index].data track by $index" ng-click="onLeftClick(value.method)">
                        <a href="tb1"  title="level.vehicle.vin.get">
                            1.获取用户车辆信息和去年投保信息
                        </a>
                    </div>
                    <div class="ng-binding">车辆</div>
                    <div class="method-title ng-scope" ng-repeat="value in interfaceGroup[$index].data track by $index" ng-click="onLeftClick(value.method)">
                        <a href="car_info" title="level.vehicle.vin.get">
                            1.车辆信息查询
                        </a>
                    </div>
                    <div class="ng-binding">返回码</div>
                    <div class="method-title ng-scope" ng-repeat="value in interfaceGroup[$index].data track by $index" ng-click="onLeftClick(value.method)">
                        <a href="code" title="level.vehicle.vin.get">
                            	返回码说明
                        </a>
                    </div>
                </div>
            </div>

            <div class="col-md-10 col-sm-9 col-xs-12 col-lg-10" id="container-right">
                <div class="container">

                    <!--右侧信息栏数据绑定-->
                    <!-- ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><div ng-repeat="i in interfaces" ng-if="isShow(i.method)" class="ng-scope">
                        <h2 name="interface_name" class="ng-binding">VIN码车型在线查询</h2>
                        <!--panel-group-->
                        <div class="panel-group" id="accordion">

                            <!--调用约束-->
                            <!-- ngIf: isShowFtp(i.method) -->

                            <!--公共参数-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseCommon0">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>公共参数
                                    </h4>
                                </div>
                                <div id="collapseCommon0" class="panel-collapse collapse in">
                                    <div class="panel-body">
                                        <div class="col-md-12 ">
                                            <div class="col-md-2 present">特别说明:</div>
                                            <div class="col-md-10">本文档为中汽数据服务平台的一个产品示例，仅为客户提供service<b>演示、测试服务</b>。</div>
                                        </div>
                                        <div class="col-md-12 ">
                                            <div class="col-md-2 present">WebService地址:</div>
                                            <div class="col-md-10">
                                            	测试地址：<a href="http://129.211.121.107/jk/api/vin/car" target="_blank">http://47.95.12.229/jk/api/vin/car</a>
                                            	正式地址：<a href="http://vin.cg1039.com/jk/api/vin/car" target="_blank">http://129.211.121.107/jk/api/vin/car</a>
                                            </div>
                                        </div>
                                        <div class="col-md-12 ">
                                            <div class="col-md-2 present">WebService方法:</div>
                                            <div class="col-md-10">
                                                public string vinByCar(string vin){ }
                                                <p><b>请将参数通过http直接请求</b>，格式如下：</p>
<pre><code class="ng-binding json">
      {
        appid:"be40fad8d4a5f8ca",
        appkey:"e4c33e2dbe40fad8d4a5f8caa0b175e9",
        vin:"4T1BE46K07U193128",
        method:"car",
        lang:"en"
      }
     </code>
</pre>
                                                <div style="color:#ff6a00;">
                                                    <p>传参字符串中的method，表示中汽已授权接口的查询方法名称，随授权接口不同而有差异，具体参见授权接口文档中<span style="color:#808080;">请求参数</span>的列表中“method”说明的内容。</p>
                                                    <!-- ngIf: isShowParam('level.vehicle.vin.ocr', i.method) -->
                                                    <!-- ngIf: isShowParam('level.cycle.levelid.get', i.method) -->
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                            </div>

                            <!--请求参数-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseReq0">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>请求参数
                                    </h4>
                                </div>
                                <div id="collapseReq0" class="panel-collapse collapse in">
                                    <div class="panel-body">
                                        <div class="col-md-12">
                                            <table class="table table-hover table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th>参数</th>
                                                        <th>是否必须</th>
                                                        <th>参数类型</th>
                                                        <th>说明</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>appid</td>
                                                        <td>是</td>
                                                        <td>String</td>
                                                        <td>请与市场人员联系</td>
                                                    </tr>
                                                    <tr>
                                                        <td>appkey</td>
                                                        <td>是</td>
                                                        <td>String</td>
                                                        <td>请与市场人员联系</td>
                                                    </tr>
                                                    <tr>
                                                        <td>method</td>
                                                        <td>否</td>
                                                        <td>String</td>
                                                        <td class="ng-binding">默认在该接口中为car</td>
                                                    </tr>
                                                    <tr>
                                                        <td>lang</td>
                                                        <td>否</td>
                                                        <td>String</td>
                                                        <td>en或cn.请求返回字段中文或英文，默认en，推荐使用en</td>
                                                    </tr>
                                                </tbody>

                                                <!--各自的参数-->
                                                <tbody>
                                                    <!-- ngRepeat: p in i.params --><tr ng-repeat="p in i.params" class="ng-scope">
                                                        <td class="ng-binding">vin</td>
                                                        <td class="ng-binding">是</td>
                                                        <td>String</td>
                                                        <td class="ng-binding">VIN码，如：4T1BE46K07U193128</td>
                                                    </tr><!-- end ngRepeat: p in i.params -->
                                                </tbody>
                                            </table>

                                            <!-- 组合接口说明 -->
                                            <!-- ngIf: i.method.indexOf('和') != -1 -->  

                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--部分响应参数-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseRes0">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>部分响应参数
                                    </h4>
                                </div>
                                <div id="collapseRes0" class="panel-collapse collapse in">
                                    <div class="panel-body">
                                        <div class="col-md-12">
                                            <table class="table table-hover table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th>节点</th>
                                                        <th>说明</th>
                                                        <th>备注</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>Result</td>
                                                        <td>检索结果</td>
                                                        <td >
                                                           	检索结果 可以用lang=cn或dev或en(默认)
                                                           cn为自动翻译 dev为字段对照 en为默认(传输最快)
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>code</td>
                                                        <td>状态码</td>
                                                        <td >
                                                           	成功200 其他为失败 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>msg</td>
                                                        <td>返回消息</td>
                                                        <td >
                                                           	失败才返回消息
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                            <!-- ngIf: isShowParam('level.cycle.levelid.get', i.method) -->
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--请求示例-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseReqCode0" aria-expanded="true">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>请求示例
                                    </h4>
                                </div>
                                <div id="collapseReqCode0" class="panel-collapse collapse in" aria-expanded="true" style="">
                                    <div class="panel-body">
                                        <div class="col-md-12">
                                            <ul id="myTab" class="nav nav-tabs">
                                                <li class=""><a href="#net" data-toggle="tab" aria-expanded="false">.NET</a></li>
                                                <li class=""><a href="#java" data-toggle="tab" aria-expanded="false">JAVA</a></li>
                                                <li class=""><a href="#php" data-toggle="tab" aria-expanded="false">PHP</a></li>
                                                <li class="active"><a href="#curl" data-toggle="tab" aria-expanded="true">CURL</a></li>
                                            </ul>
                                            <div id="myTabContent" class="tab-content">
                                                <div class="tab-pane fade" id="net">
                                                    <pre><code class="ng-binding xml">
	private string BaseUri="http://47.95.12.229/jk/api/vin/car";
	public string Post(string data, string uri)
        {
            //先根据用户请求的uri构造请求地址
            string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
            //创建Web访问对象
            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
            //把用户传过来的数据转成“UTF-8”的字节流
            byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);

            myRequest.Method = "POST";
            myRequest.ContentLength = buf.Length;
            myRequest.ContentType = "application/json";
            myRequest.MaximumAutomaticRedirections = 1;
            myRequest.AllowAutoRedirect = true;
            //发送请求
            Stream stream = myRequest.GetRequestStream();
            stream.Write(buf,0,buf.Length);
            stream.Close();

            //获取接口返回值
            //通过Web访问对象获取响应内容
            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
            //通过响应内容流创建StreamReader对象，因为StreamReader更高级更快
            StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
            string returnJson = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
            reader.Close();
            myResponse.Close();
            return returnJson;
        }
</code>
</pre>
                                                </div>
                                                <div class="tab-pane fade" id="java">
                                                    <pre><code class="java ng-binding">
	String body=HttpClient.newBuilder().build().send(
                HttpRequest.newBuilder(URI.create("http://47.95.12.229/jk/api/vin/car?appid=huangchao&amp;appkey=huangchao&amp;vin=4T1BE46K07U193128"))
                .header("Content-Type","application/json")
                .build(),
                 BodyHandlers.ofString()).body();
        System.err.println(body);
</code>
</pre>
                                                </div>
                                                <div class="tab-pane fade" id="php">
                                                    <pre><code class="php ng-binding">
   $url = 'http://47.95.12.229/jk/api/vin/car?appid=be40fad8d4a5f8ca&appkey=e4c33e2dbe40fad8d4a5f8caa0b175e9&vin=4T1BE46K07U193128';
    $body= file_get_contents($url);
</code>
</pre>
                                                </div>
                                                <div class="tab-pane fade active in" id="curl">
                                                    <pre><code class="ng-binding xml">
curl -d http://47.95.12.229/jk/api/vin/car?appid=be40fad8d4a5f8ca&appkey=e4c33e2dbe40fad8d4a5f8caa0b175e9&vin=4T1BE46K07U193128
</code>
</pre>
                                                </div>
                                            </div>

                                            <div style="color:#ff6a00;">
                                                <!-- ngIf: isShowParam('level.vehicle.vin.ocr', i.method) -->
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--响应示例-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseResCode0">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>响应示例
                                    </h4>
                                </div>
                                <div id="collapseResCode0" class="panel-collapse collapse in">
                                    <div class="panel-body">
                                        <div class="col-md-12">
                                            <ul class="nav nav-tabs">
                                                <li class="active"><a href="#json" data-toggle="tab">JSON</a></li>
                                                <li ><a href="#json1" data-toggle="tab">中文JSON</a></li>
                                            </ul>

                                            <!-- Content -->
                                            <div class="tab-content">
                                                <div style="color:#ff6a00;">
                                                    <!-- ngIf: isShowParam('level.vehicle.vin.get', i.method) --><p ng-if="isShowParam(&#39;level.vehicle.vin.get&#39;, i.method)" class="ng-scope">注意：车型信息的响应结构与仅ID的响应结构存在差异</p><!-- end ngIf: isShowParam('level.vehicle.vin.get', i.method) -->
                                                    <!-- ngIf: isShowParam('level.vehicle.vin.ocr', i.method) -->
                                                </div>

                                                <div class="tab-pane fade in active" id="json">
                                                    <pre><code class="ng-binding cs">
//英文
{"code":200,"data":[{"Manufacturers":"丰田汽车","Brand":"丰田","Series":"Camry [佳美]","Models":"Camry [佳美]","SalesName":"2.4 自动","Year":"2007","EmissionStandard":"欧4","VehicleType":"轿车","ListingYear":"2007","ListingMonth":"1","ProducedYear":"2007","IdlingYear":"2011","ProductionStatus":"停产","Country":"日本","VehicleAttributes":"进口","CylinderVolume":"2362","Displacement":"2.4","Induction":"自然吸气","FuelType":"汽油","FuelGrade":"97#","Horsepower":"167","PowerKw":"123","CylinderArrangement":"L","Cylinders":"4","ValvesPerCylinder":"4","TransmissionType":"自动","TransmissionDescription":"自动变速器(AT)","GearNumber":"4","FrontBrake":"通风盘式","RearBrake":"盘式","PowerSteering":"","EngineLocation":"前置","DriveMode":"前轮驱动","Wheelbase":"2776","Doors":"四门","Seats":"5","FrontTyre":"215/60 R16","RearTyre":"215/60 R16","FrontRim":"16英寸","RearRim":"16英寸","RimsMaterial":"铝合金","SpareWheel":"","Sunroof":"","PanoramicSunroof":"","HidHeadlamp":"","FrontFogLamp":"有","RearWiper":"","AC":"有","AutoAC":""}]}
</code>
</pre>
                                                </div>
                                                <div class="tab-pane fade in" id="json1">
                                                    <pre><code class="ng-binding cs">
//中文
{"code":200,"data":[{"空调":"有","年款":"2007","车型品牌":"丰田","车门数":"四门","座位数(含司机)":"5","自动空调":"","销售版本":"Camry [佳美]","车系":"Camry [佳美]","国别":"日本","最大功率(Kw)":"123","后轮毂规格":"16英寸","电动天窗":"","前轮毂规格":"16英寸","燃料种类":"汽油","后轮胎规格":"215/60 R16","汽缸数":"4","驱动方式":"前轮驱动","前轮胎规格":"215/60 R16","燃油标号":"97#","进气形式":"自然吸气","后制动器类型":"盘式","后雨刷":"","销售名称":"2.4 自动","轴距(mm)":"2776","前制动器类型":"通风盘式","档位数":"4","最大马力(Ps)":"167","停产年份":"2011","备胎规格":"","氙气大灯":"","上市年份":"2007","车辆类型":"轿车","排量":"2.4","前雾灯":"有","上市月份":"1","生产年份":"2007","轮毂材料":"铝合金","生产厂家":"丰田汽车","助力类型":"","气缸容积(ml)":"2362","发动机位置":"前置","排放标准":"欧4","全景天窗":"","生产状态":"停产","变速器类型":"自动","每缸气门数（个）":"4","厂家类型（国产,合资,进口）":"进口","汽缸排列形式":"L","变速器描述":"自动变速器(AT)"}]}
</code>
</pre>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--备注-->
                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" href="#collapseRemark0">
                                    <h4 class="panel-title">
                                        <i class="triangle"></i>备注
                                    </h4>
                                </div>
                                <div id="collapseRemark0" class="panel-collapse collapse in">
                                    <div class="panel-body">
                                        <div class="col-md-12">
                                            <div class="col-md-2 col-lg-2 present">接口使用约束条件:</div>
                                            <div class="col-md-10 col-lg-10">测试接口无安全性效验，但正式接口服务可能有IP 域名 header 请求方法 账号权限等安全机制</div>
                                        </div>
                                        <!-- 
                                        <div class="col-md-12">
                                            <div class="col-md-2 col-lg-2 present">中英文字段对照表:</div>
                                            <div class="col-md-10 col-lg-10"><a href="cn" target="_blank">http://47.95.12.229/jk/doc/cn</a></div>
                                        </div> -->
                                        <div class="col-md-12">
                                            <div class="col-md-2 col-lg-2 present">备注:</div>
                                            <div class="col-md-10 col-lg-10">
                                                <p style="font-style: italic;">
                                                    1.本文档中调用方式仅作参考，不是唯一调用方式
                                                    <br> 
                                                    2.本文档中返回结果为示例数据，请以实际返回结果为准 
                                                    <br>
                                                    3.部分定制接口未列入本文档，若有疑问，请联系中汽客服
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div><!-- end ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces --><!-- ngIf: isShow(i.method) --><!-- end ngRepeat: i in interfaces -->
                </div>
                <!--右侧信息栏数据绑定-->

            </div>
        </div><!--container-right尾部-->
    </div><!--content整个div-->

    <script type="text/javascript">
        $(document).ready(function () {
            $("#phone-left").click(function () {
                $("#content-left").attr("class").indexOf("hidden-xs") == -1 ? $("#content-left").addClass("hidden-xs") : $("#content-left").removeClass("hidden-xs");
            });

            $.goup({
                trigger: 100,
                bottomOffset: 50,
                locationOffset: 100,
                title: '返回顶部',
                titleAsText: true
            });

        });
    </script>



<div style="position: fixed; width: 40px; height: 40px; background: rgb(0, 0, 0); cursor: pointer; bottom: 80px; right: 100px; border-radius: 10px;" class="goup-container"><div class="goup-arrow" style="width: 0px; height: 0px; margin: 0px auto; padding-top: 13px; border-style: solid; border-width: 0px 10px 10px; border-color: transparent transparent rgb(255, 255, 255);"></div></div><div class="goup-text" style="position: fixed; width: 80px; height: auto; background: transparent; cursor: pointer; bottom: 50px; right: 80px; border-radius: 10px; text-align: center;">返回顶部</div></body></html>